package com.cskaoyan.javase.oop1._3memory;


/**
 * new对象的过程
 * @since 09:51
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Student s = new Student();
        System.out.println(s.age);
        System.out.println(s.name);
        s.age = 120;
        System.out.println(s.age);
        System.out.println(s);

        s.name = "张三";

        Student s2 = new Student();

    }
}

class Student {
    String name;
    int age;

    public void playGame() {
        System.out.println("先学好Java，找到工作，上班时候打游戏，把老板的钱赚走！");
    }
}
